<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" contentmk="width=device-width, initial-scale=1.0">
    <title>缩放</title>
    <style>
        .box1 {
            width: 100px;
            height: 100px;
            background-color: teal;

            font-size: 12px;
        }
        .box2 {
            width: 100px;
            height: 100px;
            background-color: orange;

            font-size: 12px;
            transform: scale(.8);
        }
    </style>
</head>
<body>
    <div class="box1">哈哈哈</div>
    <div class="box2">哈哈哈</div>
</body>
</html>